import { FC } from "react"

import { SFormItem } from "@/components/common"
import StyleSelect from "@/components/common/styleSelect"
import { useLocale } from "@/locales"

export type IPTypeField = {
	IPTypeCode: string
}
const MemberLoginIPTypeSelector: FC = () => {
	const { formatMessage } = useLocale()
	const options = [
		{ label: formatMessage({ id: "label.member.login_ip" }), value: 0 },
		{ label: formatMessage({ id: "label.member.ip_location" }), value: 1 },
		{ label: formatMessage({ id: "label.member.device_no" }), value: 2 }
	]

	return (
		<SFormItem name="memberLoginIpType">
			<StyleSelect
				options={options}
				defaultValue={options[0].value}
				style={{ width: "150px" }}
				placeholder={formatMessage({ id: "label.select_all" })}
			/>
		</SFormItem>
	)
}

export default MemberLoginIPTypeSelector
